﻿using Microsoft.EntityFrameworkCore;
using WebApiTwo.entity;

namespace WebApiTwo;

public class AppDbContext:DbContext
{
    public DbSet<Student> Students { get; set; }
    public AppDbContext(DbContextOptions options) :base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.ApplyConfigurationsFromAssembly(this.GetType().Assembly);
    }
}
